<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件使用的细节</title>
    <script src="./vue.js"></script>
</head>
<body>
<div id="app">
    <div ref="divRef" @click="handleClick">vue ref</div>
</div>
<script>
    var app = new Vue({
        el: '#app',
        methods: {
            handleClick: function () {
                //this.$refs 整个vue实例中所有的引用，取出divRef引用的dom节点
                alert(this.$refs.divRef.innerHTML)
            }
        }
    });
</script>
</body>
</html>